package com.zlict.admin.service.impl;

import java.util.List;
import com.zlict.common.utils.DateUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zlict.admin.mapper.RdLeaseAssetsMapper;
import com.zlict.admin.domain.RdLeaseAssets;
import com.zlict.admin.service.IRdLeaseAssetsService;

/**
 * 资产管理-经营租赁Service业务层处理
 * 
 * @author lqh
 * @date 2025-06-13
 */
@Service
@RequiredArgsConstructor
public class RdLeaseAssetsServiceImpl implements IRdLeaseAssetsService 
{

    private final RdLeaseAssetsMapper rdLeaseAssetsMapper;

    /**
     * 查询资产管理-经营租赁
     * 
     * @param id 资产管理-经营租赁主键
     * @return 资产管理-经营租赁
     */
    @Override
    public RdLeaseAssets selectRdLeaseAssetsById(Long id)
    {
        return rdLeaseAssetsMapper.selectRdLeaseAssetsById(id);
    }

    /**
     * 查询资产管理-经营租赁列表
     * 
     * @param rdLeaseAssets 资产管理-经营租赁
     * @return 资产管理-经营租赁
     */
    @Override
    public List<RdLeaseAssets> selectRdLeaseAssetsList(RdLeaseAssets rdLeaseAssets)
    {
        return rdLeaseAssetsMapper.selectRdLeaseAssetsList(rdLeaseAssets);
    }

    /**
     * 新增资产管理-经营租赁
     * 
     * @param rdLeaseAssets 资产管理-经营租赁
     * @return 结果
     */
    @Override
    public int insertRdLeaseAssets(RdLeaseAssets rdLeaseAssets)
    {
        rdLeaseAssets.setCreateTime(DateUtils.getNowDate());
        return rdLeaseAssetsMapper.insertRdLeaseAssets(rdLeaseAssets);
    }

    /**
     * 修改资产管理-经营租赁
     * 
     * @param rdLeaseAssets 资产管理-经营租赁
     * @return 结果
     */
    @Override
    public int updateRdLeaseAssets(RdLeaseAssets rdLeaseAssets)
    {
        rdLeaseAssets.setUpdateTime(DateUtils.getNowDate());
        return rdLeaseAssetsMapper.updateRdLeaseAssets(rdLeaseAssets);
    }

    @Override
    public int deleteRdLeaseAssetsByIds(Long[] ids) {
        return rdLeaseAssetsMapper.batchUpdate(ids);
    }
}
